Integrand size = 40, antiderivative size = 88 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} a^2 (3 B+4 C) x+\frac {a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 (3 B+2 C) \sin (c+d x)}{2 d}+\frac {B \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{2 d} \]
1/2*a^2*(3*B+4*C)*x+a^2*C*arctanh(sin(d*x+c))/d+1/2*a^2*(3*B+2*C)*sin(d*x+ c)/d+1/2*B*cos(d*x+c)*(a^2+a^2*sec(d*x+c))*sin(d*x+c)/d
Time = 0.38 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.09 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {a^2 \left (6 B d x+8 C d x-4 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 (2 B+C) \sin (c+d x)+B \sin (2 (c+d x))\right )}{4 d} \]
(a^2*(6*B*d*x + 8*C*d*x - 4*C*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 4 *C*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 4*(2*B + C)*Sin[c + d*x] + B *Sin[2*(c + d*x)]))/(4*d)
Time = 0.57 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {3042, 4560, 3042, 4505, 3042, 4484, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^3(c+d x) (a \sec (c+d x)+a)^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \cos ^2(c+d x) (a \sec (c+d x)+a)^2 (B+C \sec (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4505 |
\(\displaystyle \frac {1}{2} \int \cos (c+d x) (\sec (c+d x) a+a) (a (3 B+2 C)+2 a C \sec (c+d x))dx+\frac {B \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{2 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {\left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right ) \left (a (3 B+2 C)+2 a C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {B \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{2 d}\) |
\(\Big \downarrow \) 4484 |
\(\displaystyle \frac {1}{2} \left (\frac {a^2 (3 B+2 C) \sin (c+d x)}{d}-\int \left (-\left ((3 B+4 C) a^2\right )-2 C \sec (c+d x) a^2\right )dx\right )+\frac {B \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (\frac {2 a^2 C \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 (3 B+2 C) \sin (c+d x)}{d}+a^2 x (3 B+4 C)\right )+\frac {B \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{2 d}\) |
(B*Cos[c + d*x]*(a^2 + a^2*Sec[c + d*x])*Sin[c + d*x])/(2*d) + (a^2*(3*B + 4*C)*x + (2*a^2*C*ArcTanh[Sin[c + d*x]])/d + (a^2*(3*B + 2*C)*Sin[c + d*x ])/d)/2
3.4.19.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[A*a*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*n)), x] + Simp[1/(d*n) Int[(d*Csc[e + f*x])^( n + 1)*Simp[n*(B*a + A*b) + (B*b*n + A*a*(n + 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && LeQ[n, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a*A*Cot [e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x] - Sim p[b/(a*d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Sim p[a*A*(m - n - 1) - b*B*n - (a*B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0 ] && GtQ[m, 1/2] && LtQ[n, -1]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.83
method | result | size |
parallelrisch | \(\frac {3 a^{2} \left (-\frac {2 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{3}+\frac {2 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{3}+\frac {B \sin \left (2 d x +2 c \right )}{6}+\frac {2 \left (2 B +C \right ) \sin \left (d x +c \right )}{3}+x d \left (B +\frac {4 C}{3}\right )\right )}{2 d}\) | \(73\) |
derivativedivides | \(\frac {B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 B \,a^{2} \sin \left (d x +c \right )+2 C \,a^{2} \left (d x +c \right )+B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )}{d}\) | \(96\) |
default | \(\frac {B \,a^{2} \left (d x +c \right )+C \,a^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+2 B \,a^{2} \sin \left (d x +c \right )+2 C \,a^{2} \left (d x +c \right )+B \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \sin \left (d x +c \right )}{d}\) | \(96\) |
risch | \(\frac {3 a^{2} B x}{2}+2 a^{2} x C -\frac {i B \,a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {i B \,a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C \,a^{2}}{2 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}+\frac {B \,a^{2} \sin \left (2 d x +2 c \right )}{4 d}\) | \(153\) |
norman | \(\frac {\left (-\frac {3}{2} B \,a^{2}-2 C \,a^{2}\right ) x +\left (-\frac {9}{2} B \,a^{2}-6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {3}{2} B \,a^{2}+2 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {9}{2} B \,a^{2}+6 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {a^{2} \left (3 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{d}+\frac {a^{2} \left (7 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {a^{2} \left (B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {2 a^{2} \left (3 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {a^{2} \left (5 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} \left (5 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}+\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {C \,a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(318\) |
3/2*a^2*(-2/3*C*ln(tan(1/2*d*x+1/2*c)-1)+2/3*C*ln(tan(1/2*d*x+1/2*c)+1)+1/ 6*B*sin(2*d*x+2*c)+2/3*(2*B+C)*sin(d*x+c)+x*d*(B+4/3*C))/d
Time = 0.27 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.90 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (3 \, B + 4 \, C\right )} a^{2} d x + C a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - C a^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (B a^{2} \cos \left (d x + c\right ) + 2 \, {\left (2 \, B + C\right )} a^{2}\right )} \sin \left (d x + c\right )}{2 \, d} \]
integrate(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
1/2*((3*B + 4*C)*a^2*d*x + C*a^2*log(sin(d*x + c) + 1) - C*a^2*log(-sin(d* x + c) + 1) + (B*a^2*cos(d*x + c) + 2*(2*B + C)*a^2)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=a^{2} \left (\int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 C \cos ^{3}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int C \cos ^{3}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(B*cos(c + d*x)**3*sec(c + d*x), x) + Integral(2*B*cos(c + d *x)**3*sec(c + d*x)**2, x) + Integral(B*cos(c + d*x)**3*sec(c + d*x)**3, x ) + Integral(C*cos(c + d*x)**3*sec(c + d*x)**2, x) + Integral(2*C*cos(c + d*x)**3*sec(c + d*x)**3, x) + Integral(C*cos(c + d*x)**3*sec(c + d*x)**4, x))
Time = 0.27 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.15 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 4 \, {\left (d x + c\right )} B a^{2} + 8 \, {\left (d x + c\right )} C a^{2} + 2 \, C a^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 8 \, B a^{2} \sin \left (d x + c\right ) + 4 \, C a^{2} \sin \left (d x + c\right )}{4 \, d} \]
integrate(cos(d*x+c)^3*(a+a*sec(d*x+c))^2*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^2 + 4*(d*x + c)*B*a^2 + 8*(d*x + c)*C*a^2 + 2*C*a^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 8*B* a^2*sin(d*x + c) + 4*C*a^2*sin(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.65 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, C a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (3 \, B a^{2} + 4 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (3 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
1/2*(2*C*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 2*C*a^2*log(abs(tan(1/2* d*x + 1/2*c) - 1)) + (3*B*a^2 + 4*C*a^2)*(d*x + c) + 2*(3*B*a^2*tan(1/2*d* x + 1/2*c)^3 + 2*C*a^2*tan(1/2*d*x + 1/2*c)^3 + 5*B*a^2*tan(1/2*d*x + 1/2* c) + 2*C*a^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^2)/d
Time = 15.72 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.60 \[ \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,B\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {C\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {3\,B\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,C\,a^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]